package com.rc.saas.tenant.mapper.elec;

import com.rc.saas.tenant.base.BaseSearch;
import com.rc.saas.tenant.common.base.BaseMapper;
import com.rc.saas.tenant.model.elec.ElecStation;
import com.rc.saas.tenant.model.elec.ElecStationExample;
import com.rc.saas.tenant.model.hlht.HlhtTenantOpen;
import com.rc.saas.tenant.search.StatisticsSearch;
import com.rc.saas.tenant.search.elec.ElecSationSearch;
import com.rc.saas.tenant.search.hlht.HlhtTenantOpenStationSearch;
import com.rc.saas.tenant.search.elec.StationHlhtTenantOpenSearch;
import com.rc.saas.tenant.vo.elec.ElecStationAndCityName;
import com.rc.saas.tenant.vo.elec.ElecStationResult;
import com.rc.saas.tenant.vo.elec.StationAllDataVo;
import com.rc.saas.tenant.vo.elec.StatisticsStationNum;
import com.rc.saas.tenant.vo.hlht.HlhtTenantOpenStationExportVo;
import com.rc.saas.tenant.vo.hlht.HlhtTenantOpenStationVo;
import com.rc.saas.tenant.vo.hlht.StationHlhtTenantOpenVo;
import com.rc.saas.tenant.vo.invoice.InvoiceProxyStationSearchVo;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface ElecStationMapper extends BaseMapper<Long ,ElecStation,ElecStationExample> {
    void insertSelectiveReturnId(ElecStation elecStation);

    List<ElecStationResult> listPageByCondition(ElecSationSearch search);

    ElecStationAndCityName selectStationAndCity(Long elecStationId);

    int countStationByTenantCode(String tenantCode);

    ElecStation selectMostProvinceId(String tenantCode);

    List<ElecStation> listPrintStation(ElecSationSearch elecSationSearch);

    StationAllDataVo selectStationAllData(String tenantCode);

    List<ElecStation> listStationAndLatiLong(BaseSearch baseSearch);

    StationAllDataVo selectStationAllDataOperator(@Param("eleStationIds") List<Long> eleStationIds,@Param("tenantOperatorCode")  String tenantOperatorCode);

    List<ElecStation> listStationAndLatiLongOperator(String tenantOperatorCode);

    List<Long> listStationIdByOperator(String tenantOperatorCode);

    String selectLastStationNo(String tenantCode);

    BigDecimal sumTotalPowerByEpg(String tenantCode);

    long countLoginPile(String tenantCode);

    List<StationHlhtTenantOpenVo> listStationHlhtTenantOpenInternal(StationHlhtTenantOpenSearch stationHlhtTenantOpenSearch);

    List<StationHlhtTenantOpenVo> listStationHlhtTenantOpenExternal(StationHlhtTenantOpenSearch stationHlhtTenantOpenSearch);

    List<HlhtTenantOpenStationVo> listPageHlhtOpenStation(HlhtTenantOpenStationSearch hlhtTenantOpenStationSearch);

    List<ElecStation> listParkingGateStation(@Param("tenantCode") String tenantCode,@Param("parkingSupplierId") Long parkingSupplierId, @Param("status")String status);

    List<ElecStation> listElecStationNonconnectGate(@Param("tenantCode") String tenantCode);

    List<ElecStation> listByBatch(@Param("elecStationIdList") List<Long> elecStationIdList);

    List<ElecStation> listElecStationByStationName(@Param("tenantCode") String tenantCode,@Param("stationName") String stationName);

    List<ElecStationResult> listOperatorElecStaion(ElecSationSearch elecSationSearchVo);

    List<HlhtTenantOpenStationVo> listPageHlhtStation(HlhtTenantOpenStationSearch hlhtTenantOpenStationSearch);

    ElecStationAndCityName selectPositiveHlhtStationAndCity(Long elecStationId);

    void updateBatchPositiveHlhtStation(@Param("elecStationIdList") List<Long> elecStationIdList,@Param("operateStatus") String operateStatus);


    List<ElecStation> listAllStationByTenantOperatorCode(String tenantOperatorCode);

    List<HlhtTenantOpenStationExportVo> listHlhtTenantOpenStation(HlhtTenantOpenStationSearch hlhtTenantOpenStationSearch);

    List<ElecStation> listPageInvoiceProxyStation(InvoiceProxyStationSearchVo invoiceProxyStationSearchVO);

    List<ElecStation> listStationByHlhtOperatorId(@Param("tenantCode") String tenantCode, @Param("operatorIds")List<String> operatorIds);

    void updateOperateStatusByHlhtTenantOpen(@Param("hlhtTenantOpen") HlhtTenantOpen hlhtTenantOpen,@Param("operateStatus") String operateStatus);

    void updateForNoTop(Long elecStationId);

    void updateBatchSocStatus(@Param("temp")String temp, @Param("stationId")String[] stationId);

    void updateBatchBatteryStatus(@Param("temp")String temp,@Param("stationId") String[] stationId);

    void updateSecurityStatus(String tenantCode);

    ElecStation selectLaststationNo();

    int countStation(StatisticsSearch search);

    StatisticsStationNum getStatisticsStationNum(ElecSationSearch search);
}
